<%= form_for [:admin, @category], html: {id: 'category-form', class: 'uk-form'}, remote: true do |f| %>
    <fieldset>
      <legend><%= f.object.new_record? ? '添加分类' : '编辑分类' %></legend>
      <div class="uk-form-row uk-grid">
        <div class="uk-text-right uk-width-1-10">
          <%= f.label :name, nil, class: 'uk-form-label' %>
        </div>
        <div class="uk-form-controls uk-width-9-10">
          <%= f.text_field :name, class: 'uk-width-1-1' %>
        </div>
      </div>

      <div class="uk-form-row uk-grid">
        <div class="uk-text-right uk-width-1-10">
          <%= f.label :slug, nil, class: 'uk-form-label' %>
        </div>
        <div class="uk-form-controls uk-width-9-10">
          <%= f.text_field :slug, class: 'uk-width-1-1' %>
        </div>
      </div>

      <div class="uk-form-row uk-clearfix">
        <%= f.submit nil, class: 'uk-button uk-button-primary uk-float-right' %>
      </div>
    </fieldset>
<% end %>
